package src;

public class TempObject implements Comparable<TempObject>{

	int x;
	int key;
	
	public TempObject(int x, int key){
		this.x = x;
		this.key = key;
	}
	
	@Override
	public boolean equals(Object obj) {
		
		boolean eh = false;
		if(obj instanceof TempObject){
			TempObject ob = (TempObject)obj;
			eh = (ob.x == this.x && ob.key == this.key);
		}
		
		return eh;
	}

	@Override
	public int compareTo(TempObject o) {
		if(this.x < o.x){
			return -1;
		}
		else if(this.x > o.x){
			return 1;
		}
		else{
			return 0;
		}
	}
}
